﻿namespace HelperLibrary;
public class AppSetting
{
    /// <summary>
    /// appsetting 设置
    /// </summary>
    public static ConfigModel configModel { get; private set; }

    public static void SettingInit(IConfiguration configuration)
    {
        configModel = new ConfigModel { };
        configuration.GetSection("UMPlatformService").Bind(configModel.UMPlatformConfig);
    }

    public class ConfigModel
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        public ConfigModel()
        {
            UMPlatformConfig = new UMPlatformConfig();
        }

        /// <summary>
        /// 统一消息平台
        /// </summary>
        public UMPlatformConfig UMPlatformConfig { get; set; }
    }

    /// <summary>
    /// 统一消息平台配置
    /// </summary>
    public class UMPlatformConfig
    {
        /// <summary>
        /// 地址
        /// </summary>
        public string Host { get; set; }
        /// <summary>
        /// AK
        /// </summary>
        public string AK { get; set; }
        /// <summary>
        /// Sk
        /// </summary>
        public string SK { get; set; }
    }
}
